package com.mep.auth.feign;

import com.mep.auth.model.SysRole;
import com.mep.auth.model.SysRoleMenu;
import com.mep.common.http.HttpResult;
import com.mep.common.page.PageRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "story-auth/role", path = "/")
public interface IFeignSysRoleApi {

//    @ApiOperation(value="01.保存角色信息",notes="问题点:保存角色信息")
//    @ApiOperationSupport(order = 1, author = "lyl")
    @PostMapping(value="/save")
    HttpResult save(@RequestBody SysRole record);

//    @ApiOperation(value="02.删除角色信息",notes="问题点:删除角色信息")
//    @ApiOperationSupport(order = 2, author = "lyl")
    @PostMapping(value="/delete")
    HttpResult delete(@RequestBody List<SysRole> records);

//    @ApiOperation(value="03.查询角色的分页信息",notes="问题点:查询角色的分页信息")
//    @ApiOperationSupport(order = 3, author = "lyl")
    @PostMapping(value="/findPage")
    HttpResult findPage(@RequestBody PageRequest pageRequest);

//    @ApiOperation(value="04.查询角色list信息",notes="问题点:查询角色list信息")
//    @ApiOperationSupport(order = 4, author = "lyl")
    @PostMapping(value="/findAll")
    HttpResult findAll();

//    @ApiOperation(value="05.通过角色Id查询角色菜单信息",notes="问题点:通过角色Id查询角色菜单信息")
//    @ApiOperationSupport(order = 5, author = "lyl")
    @PostMapping(value="/findRoleMenus")
    HttpResult findRoleMenus(@RequestParam Long roleId);

//    @ApiOperation(value="06.保存角色权限信息",notes="问题点:保存角色权限信息")
//    @ApiOperationSupport(order = 6, author = "lyl")
    @PostMapping(value="/saveRoleMenus")
    HttpResult saveRoleMenus(@RequestBody List<SysRoleMenu> records);
}
